package org.example.service;

import jakarta.annotation.Resource;
import org.example.dao.IOrderdetailetRepository;
import org.example.dao.IOrdersRepository;
import org.example.entity.Orderdetailet;
import org.example.entity.Orders;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Service
public class OrdersDetailetService {
    @Resource
    private IOrdersRepository ordersRepository;
    @Resource
    private IOrderdetailetRepository orderdetailetRepository;

    public Orderdetailet save(Orderdetailet od){
        return orderdetailetRepository.save(od);
    }

    public List<Orderdetailet> findAllByOrders(Orders orders){
        return orderdetailetRepository.findAllByOrders(orders);
    }
}
